<%@ page import="com.ecable.daoImpl.*"%>
<%@page import="java.util.Vector"%>
<%@ page errorPage="UserExceptionHandler.jsp"%>
<%@page import="java.util.Iterator"%>
<%@page import="com.ecable.bean.PackagesTO"%>
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
	<head>

		<style type="text/css">
.Title {
	font-family: Verdana;
	font-weight: bold;
	font-size: 8pt
}

.Title1 {
	font-family: Verdana;
	font-weight: bold;
	font-size: 8pt
}
</style>

		<script language="JavaScript" src="scripts/gen_validatorv31.js"
			type="text/javascript"></script>
		<script language="JavaScript" type="text/javascript"
			src="scripts/ts_picker.js"></script>
		<script language="JavaScript1.1" src="scripts/pass.js">


</script>
		<script type="text/javascript" src="scripts/image.js"> </script>
		<script type="text/javascript" src="scripts/general.js"> </script>
		<script type="text/javascript" src="scripts/adi.js"> </scri  pt>
		<script type="text/javascript" src="scripts/form_validation.js"> </script>

		<script language="JavaScript" src="images/javascripts.js"></script>
		<script language="JavaScript" src="images/pop-closeup.js"></script>
	</head>
	<body>
		<jsp:include page="Header.jsp"></jsp:include>


		<%
			String status = (String) request.getAttribute("status");
			String path = request.getRealPath("/images");
			//Profile aprofile = new ProfileDAO().getProfile(path, user);
			String s;
		%>
		<center>
			<b>Packges Details</b>

			<table align="center" border="1" bgcolor="" width="60%"
				cellpadding="10">
				<tr>

					<th>
						<strong><span class="style14 Title">PACKAGEID 
					</th>

					<th>
						PACKAGENAME

					</th>
					<th>
						PACKAGE
						<br>
						DISCRIPTION

					</th>
					<th>
						PACKAGE
						<br>
						AMOUNT

					</th>
					<%
						if (session.getAttribute("role").equals("Admin")
								|| session.getAttribute("role").equals("Operator")) {
					%>
					<th>
						PACKAGE
						<br>
						STATUS

					</th>
					<%
						}
					%>
				</tr>
				<%
					Vector c = (Vector) request.getAttribute("packinfo");
					Iterator it = c.listIterator();
					int count = 0;
					while (it.hasNext()) {
						System.out.println("loop repeated" + count);
						PackagesTO pack = (PackagesTO) it.next();
				%>



				<tr>
					<td>
						<%
							if (session.getAttribute("role").equals("Admin")
										|| session.getAttribute("role").equals("Operator")) {
						%>
						<a href='./PackageUpdate?packid=<%=pack.getPackid()%>'><%=pack.getPackid()%>
							<%
								} else {
							%><%=pack.getPackid()%> <%
 	}
 %>
						
					</td>
					<td>
						<%=pack.getPackname()%>

					</td>


					<td>
						<%=pack.getPackdiscription()%>

					</td>


					<td>
						<%=pack.getPackamount()%>

					</td>

					<%
						if (session.getAttribute("role").equals("Admin")
									|| session.getAttribute("role").equals("Operator")) {
					%>
					<td>
						<%=pack.getPackstatus()%>

					</td>

					<%
						}
					%>

				</tr>
				<%
					}
				%>
			</table>
		</center>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<jsp:include page="Footer.jsp"></jsp:include>
	</body>
</html>